export function setCustomCell(dataSource) {
  return (data, index, column) => {
    const list: Array<object> = dataSource.filter((item) => {
      return item[column.dataIndex] == data[column.dataIndex];
    });
    const indexNum: number = dataSource.findIndex((item) => {
      return item[column.dataIndex] == data[column.dataIndex];
    });
    for (let i = indexNum + 1; i < list.length + indexNum; i++) {
      if (index === i) {
        return { rowSpan: 0 };
      }
    }
    if (index === indexNum) {
      return { rowSpan: list.length };
    }
  };
}
